<!DOCTYPE html>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><link rel="canonical" href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx">
        <title>Task Class (System.Threading.Tasks)</title>




<meta name="DCS.dcsuri" content="/en-us/library/dd235678(d=default,l=en-us,v=vs.110).aspx">

<meta name="NormalizedUrl" content="http://msdn.microsoft.com/en-us/library/dd235678(d=default,l=en-us,v=vs.110).aspx">

<meta name="DCSext.ProductFamily" content="LIB_DG">

<meta name="DCSext.Product" content="NDP_CLR">

<meta name="DCSext.Title" content="Task Class">

<meta name="VotingContextUrl" content="http://msdn.microsoft.com/en-us/library/dd235678(d=default,l=en-us,v=vs.110).aspx">

<meta name="MN" content="FB361392-9:34:43 AM">

<meta name="Search.ShortId" content="dd235678">

<meta name="Ms.Locale" content="en-us">








        
    <link rel="stylesheet" type="text/css" href="MicrosoftTaskClass_System.Threading.Tasks_files/Combined.css"><script src="MicrosoftTaskClass_System.Threading.Tasks_files/ms2.js" async="" type="text/javascript"></script><script class="mtps-injected">try {
/**/
(window.MTPS || (window.MTPS = {})).cdnDomains || (window.MTPS.cdnDomains = { 
	"image": "http://i.msdn.microsoft.com", 
	"js": "http://i2.msdn.microsoft.com", 
	"css": "http://i3.msdn.microsoft.com"
});
/**/
} finally { MTPS._injectNextScript_0 && MTPS._injectNextScript_0(); }</script><script src="MicrosoftTaskClass_System.Threading.Tasks_files/jquery-1.js" class="mtps-injected"></script><script class="mtps-injected">try {
//
  var literalNormalizedUrl = '/en-us/library/dd235678(d=default,l=en-us,v=vs.110).aspx';
  var wt_nvr_ru = 'WT_NVR_RU';
  var wt_fpcdom = '.microsoft.com';
  var wt_domlist = 'msdn.microsoft.com';
  var wt_pathlist = '';
  var wt_paramlist = 'DCSext.mtps_devcenter';
  var wt_siteid = 'MSDN';
  var gDomain = 'm.webtrends.com';
  var gDcsId = 'dcsmgru7m99k7mqmgrhudo0k8_8c6m';
  var gFpc = 'WT_FPC';



  if (document.cookie.indexOf(gFpc + "=") == -1) {
    var wtidJs = document.createElement("script");
    wtidJs.src = "//" + gDomain + "/" + gDcsId + "/wtid.js";
    document.getElementsByTagName("head")[0].appendChild(wtidJs);
  }



  var detectedLocale = 'en-us';
  var wtsp = 'msdnlib_dotnet';
  var gTrackEvents = '0';
/**/
} finally { MTPS._injectNextScript_2 && MTPS._injectNextScript_2(); }</script><script src="MicrosoftTaskClass_System.Threading.Tasks_files/wtid.js"></script><script class="mtps-injected">try {
/**/
  var omni_guid = "2bf44dc7-9666-47f8-b76a-07d8854f6b2a";
/**/
} finally { MTPS._injectNextScript_3 && MTPS._injectNextScript_3(); }</script><script src="MicrosoftTaskClass_System.Threading.Tasks_files/Combined.js" class="mtps-injected"></script><script src="MicrosoftTaskClass_System.Threading.Tasks_files/SearchBox.js" class="mtps-injected"></script><script src="MicrosoftTaskClass_System.Threading.Tasks_files/Combined_002.js" class="mtps-injected"></script><script class="mtps-injected">try {
MTPS = window.MTPS || {}; MTPS.LocalizedStrings = window.MTPS.LocalizedStrings || {}; MTPS.LocalizedStrings.ExpandButtonTooltip = 'Expand'; MTPS.LocalizedStrings.CollapseButtonTooltip = 'Collapse';
} finally { MTPS._injectNextScript_7 && MTPS._injectNextScript_7(); }</script><script src="MicrosoftTaskClass_System.Threading.Tasks_files/Combined_003.js" class="mtps-injected"></script><script src="MicrosoftTaskClass_System.Threading.Tasks_files/broker.js"></script><script class="mtps-injected">try {
$(document).ready(function() {
        try {
            var token = $("#globalRequestVerification input[name='__RequestVerificationToken']").clone();
            $("#siteFeedbackForm").append(token);
        } catch(err) {
            
        }
    });
} finally { MTPS._injectNextScript_9 && MTPS._injectNextScript_9(); }</script><link media="print" type="text/css" rel="stylesheet" href="MicrosoftTaskClass_System.Threading.Tasks_files/PrintView.css"></head>
    <body class="library">
        <div id="page">
            
            
  
            
  



    
    <div id="ux-header" class="IE IE7 ltr">
        <div class="BrandLogo">
            <a href="http://msdn.microsoft.com/en-us">
                <span class="BrandLogoImage msdn" title="MSDN"></span>
            </a>
        </div>
        <div class="GlobalBar">
            <div id="LocaleSelector">
                
<a title="Change your language" id="SelectLocale" href="http://msdn.microsoft.com/en-us/SelectLocale?fromPage=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fsystem.threading.tasks.task.aspx">United States (English)</a>
        
            
            
            </div>

            

    <div class="signIn"><a class="scarabLink" href="https://login.live.com/login.srf?wa=wsignin1.0&amp;rpsnv=11&amp;ct=1367339683&amp;rver=6.0.5276.0&amp;wp=MCLBI&amp;wlcxt=MSDN%24MSDN%24MSDN&amp;wreply=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fsystem.threading.tasks.task.aspx&amp;lc=1033&amp;id=254354&amp;mkt=en-US" title="Sign in">Sign in</a></div>

                
                <div class="Icons">
                    <a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task%28d=printer%29.aspx" title="Print/Export" rel="nofollow">
                        <div class="clip26x23">
                            <img class="isd_print" src="MicrosoftTaskClass_System.Threading.Tasks_files/ImageSprite.png" alt="">
                        </div>
                    </a>
                </div>
        </div>
        <div class="ux-mtps-internav">
            

    

<div class="SearchBox">
              <form id="HeaderSearchForm" name="HeaderSearchForm" method="get" action="http://social.technet.microsoft.com/Search" onsubmit="return Epx.Controls.SearchBox.searchBoxOnSubmit(this, this.title);">
            <input value="Search MSDN with Bing" style="color: rgb(170, 170, 170); font-style: italic;" title="Search MSDN with Bing" autocomplete="off" id="HeaderSearchTextBox" name="query" maxlength="200" onfocus="Epx.Controls.SearchBox.watermarkFocus(this, this.title, 'TextBoxSearch')" onblur="Epx.Controls.SearchBox.watermarkBlur(this, this.title, 'TextBoxSearch')" type="text">
            <input id="RefinementId" name="refinement" value="" type="hidden">
            <button title="Search MSDN with Bing" id="HeaderSearchButton" value="" type="submit" class="header-search-button"></button>
        <div style="display: none; text-align: left; border: 1px solid buttonshadow; position: absolute; z-index: 1000; padding: 2px; background-color: rgb(255, 255, 255); color: rgb(161, 161, 161); font-family: 'Segoe UI','Lucida Grande',Verdana,Arial,Helvetica,sans-serif; font-size: 11.5333px;" id="SearchFlyoutContainer"><div id="SuggestionContainer"><ul style="list-style: none outside none; padding: 4px 2px 0px 1px; cursor: pointer; margin: 1px; white-space: nowrap;"></ul></div></div></form>
        
    
</div>

            <div class="TocNavigation">
   
   <div class="toclevel1">
          <a class="normal" href="http://msdn.microsoft.com/" title="Home">Home</a>
          <a class="active" href="http://msdn.microsoft.com/library/default.aspx" title="Library">Library</a>
          <a class="normal" href="http://msdn.microsoft.com/bb188199" title="Learn">Learn</a>
          <a class="normal" href="http://code.msdn.microsoft.com/" title="Samples">Samples</a>
          <a class="normal" href="http://msdn.microsoft.com/aa570309" title="Downloads">Downloads</a>
          <a class="normal" href="http://msdn.microsoft.com/hh361695" title="Support">Support</a>
          <a class="normal" href="http://msdn.microsoft.com/aa497440" title="Community">Community</a>
          <a class="normal" href="http://social.msdn.microsoft.com/forums/en-us/categories" title="Forums">Forums</a>

    </div>
  
</div>
        </div>
    </div>


        
            <div id="body">
                







<div class="leftNavResize1" id="leftNav">



<div id="tocnav">
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/ms123401.aspx" id="ms310241_MSDN.10_en-us" title="MSDN Library">MSDN Library</a>            </div>
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/ff361664.aspx" id="aa139615_MSDN.10_en-us" title=".NET Development">.NET Development</a>            </div>
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/w0x726c2.aspx" id="aa139616_MSDN.10_en-us" title=".NET Framework 4.5">.NET Framework 4.5</a>            </div>
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/gg145045.aspx" id="hh795167_VS.110_en-us" title=".NET Framework Class Library">.NET Framework Class Library</a>            </div>
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/gg145014.aspx" id="hh800821_VS.110_en-us" title="System.Threading Namespaces">System.Threading Namespaces</a>            </div>
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/dd235608.aspx" id="hh796978_VS.110_en-us" title="System.Threading.Tasks">System.Threading.Tasks</a>            </div>
            <div style="padding-left: 17px;" data-childrenloaded="true" class="toclevel1 current" data-toclevel="1">
<a class="toc_expanded" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/dd235678.aspx" id="hh796575_VS.110_en-us" title="Task Class">Task Class</a>            </div>
            <div style="padding-left: 34px;" class="toclevel2" data-toclevel="2">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.task.aspx" id="hh796922_VS.110_en-us" title="Task Constructor">Task Constructor</a>            </div>
            <div style="padding-left: 34px;" class="toclevel2" data-toclevel="2">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task_methods.aspx" id="hh800909_VS.110_en-us" title="Task Methods">Task Methods</a>            </div>
            <div style="padding-left: 34px;" class="toclevel2" data-toclevel="2">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task_properties.aspx" id="hh794203_VS.110_en-us" title="Task Properties">Task Properties</a>            </div>
</div>    
    
    
    
    
    
    
    

<a style="left: 280px; display: inline-block;" id="NavigationResize" href="javascript:void(0)">
    <img style="" class="cl_nav_resize_open" src="MicrosoftTaskClass_System.Threading.Tasks_files/ImageSprite.png" title="Expand" alt="Expand">
    <img style="display: none;" class="cl_nav_resize_close" src="MicrosoftTaskClass_System.Threading.Tasks_files/ImageSprite.png" title="Minimize" alt="Minimize">
</a>



</div>
<div style="margin-left: 280px; width: auto;" id="content" class="content">










    
    

    

    

        
<div xmlns="http://www.w3.org/1999/xhtml">
  
  <div class="topic" xmlns="http://www.w3.org/1999/xhtml" xmlns:mtps="http://msdn2.microsoft.com/mtps" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:cs="http://msdn.microsoft.com/en-us/">
    <h1 class="title">Task Class</h1>
    
    <div class="lw_vs">
      <div id="curversion">
        <strong>
            .NET Framework 4.5
        </strong>
      </div>
      <div id="versionclick">
        <div id="vsseperator" class="cl_lw_vs_seperator"></div>
        <div>
          <div>
            <a id="vsLink" href="javascript:;">
                        Other Versions
                    </a>
          </div>
          <div class="cl_vs_arrow clip10x10">
            <img class="cl_lw_vs_arrow" id="vsArrow" alt="" src="MicrosoftTaskClass_System.Threading.Tasks_files/ImageSprite.png">
          </div>
        </div>
        <ul style="display: none;" id="vsPanel">
          <li>
            <a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task%28v=vs.100%29.aspx" title="">.NET Framework 4</a>
          </li>
          <li>
            <a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task%28v=vs.95%29.aspx" title="">Silverlight </a>
          </li>
        </ul>
      </div>
    <div id="ratingCounterSeperator" class="cl_lw_vs_seperator" style="display: block;"></div><div style="margin: 0px 0px 0px 13px; display: block;" id="ratingCounter">
        <span id="rcA" class="ratingText">
            11 out of 14 rated this helpful <span id="rateThisPrefix">- </span><a id="rateThisTopic" href="#feedback" title="Rate this topic">Rate this topic</a>
            
        </span>
    </div></div>
    <div style="clear:both;"></div>
    
    <div id="mainSection">
      <div id="mainBody">
        <p>
          
        </p>
        <div>
          <div class="summary">
            <p>Represents an asynchronous operation.</p>
          </div>
        </div>
        <div>
          
          <div class="LW_CollapsibleArea_TitleDiv">
            <div>
              <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse">
                <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                <span class="LW_CollapsibleArea_Title">Inheritance Hierarchy</span>
              </a>
              <div class="LW_CollapsibleArea_HrDiv">
                <hr class="LW_CollapsibleArea_Hr">
              </div>
            </div>
          </div>
          <div class="sectionblock">
            <a id="familyToggle">
              
            </a>
            <a href="http://msdn.microsoft.com/en-us/library/system.object.aspx">System<span xmlns="">.</span>Object</a>
            <br>&nbsp;&nbsp;<span class="selflink">System.Threading.Tasks<span xmlns="">.</span>Task</span><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://msdn.microsoft.com/en-us/library/dd321424.aspx">System.Threading.Tasks<span xmlns="">.</span>Task<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span></a><br></div>
        </div>
        <p>
          
        </p> <strong>Namespace:</strong> 
  &nbsp;<a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.aspx">System.Threading.Tasks</a><br> <strong>Assembly:</strong>
  &nbsp;<span>mscorlib</span> (in mscorlib.dll)<div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">Syntax</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="syntaxToggle"></a>
<div id="code-snippet-1" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabActive" dir="ltr"><a>C#</a></div><div class="codeSnippetContainerTab" dir="ltr"><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx?cs-save-lang=1&amp;cs-lang=cpp#code-snippet-1">C++</a></div><div class="codeSnippetContainerTab" dir="ltr"><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx?cs-save-lang=1&amp;cs-lang=fsharp#code-snippet-1">F#</a></div><div class="codeSnippetContainerTab" dir="ltr"><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx?cs-save-lang=1&amp;cs-lang=vb#code-snippet-1">VB</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_baad68f7-2b8b-4c5b-8bda-f9cd11868b47');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_baad68f7-2b8b-4c5b-8bda-f9cd11868b47" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre>[HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = <span style="color:Blue;">true</span>, 
	ExternalThreading = <span style="color:Blue;">true</span>)]
<span style="color:Blue;">public</span>&nbsp;<span style="color:Blue;">class</span>&nbsp;Task : IAsyncResult, IDisposable
</pre></div>
            
        </div>
    </div>
</div>
</div></div><p>The <span class="selflink">Task</span> type exposes the following members.</p><div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">Constructors</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="constructorTableToggle"></a><table id="memberList" class="members"><tbody><tr><th class="iconColumn">
              &nbsp;
            </th><th class="nameColumn">Name</th><th class="descriptionColumn">Description</th></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321321.aspx">Task(Action)</a></td><td><span>Initializes a new <span><span class="selflink">Task</span></span> with the specified action.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd783029.aspx">Task(Action, CancellationToken)</a></td><td><span>Initializes a new <span><span class="selflink">Task</span></span> with the specified action and <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.cancellationtoken.aspx">CancellationToken</a></span>.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321320.aspx">Task(Action, TaskCreationOptions)</a></td><td><span>Initializes a new <span><span class="selflink">Task</span></span> with the specified action and creation options.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd235693.aspx">Task(Action<span xmlns="">&lt;</span>Object<span xmlns="">&gt;</span>, Object)</a></td><td><span>Initializes a new <span><span class="selflink">Task</span></span> with the specified action and state.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd783257.aspx">Task(Action, CancellationToken, TaskCreationOptions)</a></td><td><span>Initializes a new <span><span class="selflink">Task</span></span> with the specified action and creation options.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd783035.aspx">Task(Action<span xmlns="">&lt;</span>Object<span xmlns="">&gt;</span>, Object, CancellationToken)</a></td><td><span>Initializes a new <span><span class="selflink">Task</span></span> with the specified action, state, and options.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd235633.aspx">Task(Action<span xmlns="">&lt;</span>Object<span xmlns="">&gt;</span>, Object, TaskCreationOptions)</a></td><td><span>Initializes a new <span><span class="selflink">Task</span></span> with the specified action, state, and options.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd991792.aspx">Task(Action<span xmlns="">&lt;</span>Object<span xmlns="">&gt;</span>, Object, CancellationToken, TaskCreationOptions)</a></td><td><span>Initializes a new <span><span class="selflink">Task</span></span> with the specified action, state, and options.</span></td></tr></tbody></table><a href="#mainBody">Top</a></div></div><div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">Properties</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="propertyTableToggle"></a><table id="memberList1" class="members"><tbody><tr><th class="iconColumn">
              &nbsp;
            </th><th class="nameColumn">Name</th><th class="descriptionColumn">Description</th></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubproperty" alt="Public property" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public property" xmlns="" class="cl_IC74937"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.asyncstate.aspx">AsyncState</a></td><td><span>Gets the state object supplied when the <span><span class="selflink">Task</span></span> was created, or null if none was supplied.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubproperty" alt="Public property" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public property" xmlns="" class="cl_IC74937"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.creationoptions.aspx">CreationOptions</a></td><td><span>Gets the <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskcreationoptions.aspx">TaskCreationOptions</a></span> used to create this task.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubproperty" alt="Public property" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public property" xmlns="" class="cl_IC74937"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.currentid.aspx">CurrentId</a></td><td><span>Returns the unique ID of the currently executing <span><span class="selflink">Task</span></span>.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubproperty" alt="Public property" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public property" xmlns="" class="cl_IC74937"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.exception.aspx">Exception</a></td><td><span>Gets the <span><a href="http://msdn.microsoft.com/en-us/library/system.aggregateexception.aspx">AggregateException</a></span> that caused the <span><span class="selflink">Task</span></span> to end prematurely. If the <span><span class="selflink">Task</span></span> completed successfully or has not yet thrown any exceptions, this will return <span><span class="input"><span xmlns="">null</span></span><span xmlns=""></span></span>.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubproperty" alt="Public property" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public property" xmlns="" class="cl_IC74937"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.factory.aspx">Factory</a></td><td><span>Provides access to factory methods for creating <span><span class="selflink">Task</span></span> and <span><a href="http://msdn.microsoft.com/en-us/library/dd321424.aspx">Task<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span></a></span> instances.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubproperty" alt="Public property" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public property" xmlns="" class="cl_IC74937"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.id.aspx">Id</a></td><td><span>Gets a unique ID for this <span><span class="selflink">Task</span></span> instance.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubproperty" alt="Public property" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public property" xmlns="" class="cl_IC74937"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.iscanceled.aspx">IsCanceled</a></td><td><span>Gets whether this <span><span class="selflink">Task</span></span> instance has completed execution due to being canceled.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubproperty" alt="Public property" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public property" xmlns="" class="cl_IC74937"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.iscompleted.aspx">IsCompleted</a></td><td><span>Gets whether this <span><span class="selflink">Task</span></span> has completed.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubproperty" alt="Public property" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public property" xmlns="" class="cl_IC74937"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.isfaulted.aspx">IsFaulted</a></td><td><span>Gets whether the <span><span class="selflink">Task</span></span> completed due to an unhandled exception.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubproperty" alt="Public property" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public property" xmlns="" class="cl_IC74937"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.status.aspx">Status</a></td><td><span>Gets the <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskstatus.aspx">TaskStatus</a></span> of this task.</span></td></tr></tbody></table><a href="#mainBody">Top</a></div></div><div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">Methods</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="methodTableToggle"></a><table id="memberList2" class="members"><tbody><tr><th class="iconColumn">
              &nbsp;
            </th><th class="nameColumn">Name</th><th class="descriptionColumn">Description</th></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.configureawait.aspx">ConfigureAwait</a></td><td><span>Configures an awaiter used to await this <span><span class="selflink">Task</span></span>.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd270696.aspx">ContinueWith(Action<span xmlns="">&lt;</span>Task<span xmlns="">&gt;</span>)</a></td><td><span>Creates a continuation that executes asynchronously when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd783219.aspx">ContinueWith(Action<span xmlns="">&lt;</span>Task<span xmlns="">&gt;</span>, CancellationToken)</a></td><td><span>Creates a continuation that executes asynchronously when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321576.aspx">ContinueWith(Action<span xmlns="">&lt;</span>Task<span xmlns="">&gt;</span>, TaskContinuationOptions)</a></td><td><span>Creates a continuation that executes according to the specified <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskcontinuationoptions.aspx">TaskContinuationOptions</a></span>.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321307.aspx">ContinueWith(Action<span xmlns="">&lt;</span>Task<span xmlns="">&gt;</span>, TaskScheduler)</a></td><td><span>Creates a continuation that executes asynchronously when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh139097.aspx">ContinueWith(Action<span xmlns="">&lt;</span>Task, Object<span xmlns="">&gt;</span>, Object)</a></td><td><span>Creates a continuation that executes when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194842.aspx">ContinueWith(Action<span xmlns="">&lt;</span>Task, Object<span xmlns="">&gt;</span>, Object, CancellationToken)</a></td><td><span>Creates a continuation that executes when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194741.aspx">ContinueWith(Action<span xmlns="">&lt;</span>Task, Object<span xmlns="">&gt;</span>, Object, TaskContinuationOptions)</a></td><td><span>Creates a continuation that executes when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194793.aspx">ContinueWith(Action<span xmlns="">&lt;</span>Task, Object<span xmlns="">&gt;</span>, Object, TaskScheduler)</a></td><td><span>Creates a continuation that executes when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd991174.aspx">ContinueWith(Action<span xmlns="">&lt;</span>Task<span xmlns="">&gt;</span>, CancellationToken, TaskContinuationOptions, TaskScheduler)</a></td><td><span>Creates a continuation that executes according to the specified <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskcontinuationoptions.aspx">TaskContinuationOptions</a></span>.</span></td></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194761.aspx">ContinueWith(Action<span xmlns="">&lt;</span>Task, Object<span xmlns="">&gt;</span>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler)</a></td><td><span>Creates a continuation that executes when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321405.aspx">ContinueWith<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task, TResult<span xmlns="">&gt;</span>)</a></td><td><span>Creates a continuation that executes asynchronously when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd784416.aspx">ContinueWith<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task, TResult<span xmlns="">&gt;</span>, CancellationToken)</a></td><td><span>Creates a continuation that executes asynchronously when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321561.aspx">ContinueWith<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task, TResult<span xmlns="">&gt;</span>, TaskContinuationOptions)</a></td><td><span>Creates a continuation that executes according to the condition specified in <span class="parameter">continuationOptions</span>.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321428.aspx">ContinueWith<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task, TResult<span xmlns="">&gt;</span>, TaskScheduler)</a></td><td><span>Creates a continuation that executes asynchronously when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh160386.aspx">ContinueWith<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task, Object, TResult<span xmlns="">&gt;</span>, Object)</a></td><td><span>Creates a continuation that executes when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194917.aspx">ContinueWith<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task, Object, TResult<span xmlns="">&gt;</span>, Object, CancellationToken)</a></td><td><span>Creates a continuation that executes when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194912.aspx">ContinueWith<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task, Object, TResult<span xmlns="">&gt;</span>, Object, TaskContinuationOptions)</a></td><td><span>Creates a continuation that executes when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194915.aspx">ContinueWith<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task, Object, TResult<span xmlns="">&gt;</span>, Object, TaskScheduler)</a></td><td><span>Creates a continuation that executes when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd784422.aspx">ContinueWith<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task, TResult<span xmlns="">&gt;</span>, CancellationToken, TaskContinuationOptions, TaskScheduler)</a></td><td><span>Creates a continuation that executes according to the condition specified in <span class="parameter">continuationOptions</span>.</span></td></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194911.aspx">ContinueWith<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task, Object, TResult<span xmlns="">&gt;</span>, Object, CancellationToken, TaskContinuationOptions, TaskScheduler)</a></td><td><span>Creates a continuation that executes when the target <span><span class="selflink">Task</span></span> completes.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194873.aspx">Delay(Int32)</a></td><td><span>Creates a task that will complete after a time delay.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh139096.aspx">Delay(TimeSpan)</a></td><td><span>Creates a task that will complete after a time delay.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194865.aspx">Delay(Int32, CancellationToken)</a></td><td><span>Creates a task that will complete after a time delay.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194845.aspx">Delay(TimeSpan, CancellationToken)</a></td><td><span>Creates a task that will complete after a time delay.</span></td></tr><tr data="public;declared;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"></td><td><a href="http://msdn.microsoft.com/en-us/library/dd270681.aspx">Dispose<span xmlns="">()</span></a></td><td><span>Releases all resources used by the current instance of the <span><span class="selflink">Task</span></span> class.</span></td></tr><tr data="protected;declared;"><td><img id="protmethod" alt="Protected method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Protected method" xmlns="" class="cl_IC155188"></td><td><a href="http://msdn.microsoft.com/en-us/library/dd270688.aspx">Dispose(Boolean)</a></td><td><span>Disposes the <span><span class="selflink">Task</span></span>, releasing all of its unmanaged resources.</span></td></tr><tr data="public;inherited;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/bsc2ak47.aspx">Equals(Object)</a></td><td><span>Determines whether the specified object is equal to the current object.</span> (Inherited from <a href="http://msdn.microsoft.com/en-us/library/system.object.aspx">Object</a>.)</td></tr><tr data="protected;inherited;portable_library;Windows_store_apps;"><td><img id="protmethod" alt="Protected method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Protected method" xmlns="" class="cl_IC155188"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.object.finalize.aspx">Finalize</a></td><td><span>Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.</span> (Inherited from <a href="http://msdn.microsoft.com/en-us/library/system.object.aspx">Object</a>.)</td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194922.aspx">FromResult<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span></a></td><td><span>Creates a <span><a href="http://msdn.microsoft.com/en-us/library/dd321424.aspx">Task<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span></a></span> that's completed successfully with the specified result.</span></td></tr><tr data="public;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.getawaiter.aspx">GetAwaiter</a></td><td><span>Gets an awaiter used to await this <span><span class="selflink">Task</span></span>.</span></td></tr><tr data="public;inherited;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx">GetHashCode</a></td><td><span>Serves as a hash function for a particular type. </span> (Inherited from <a href="http://msdn.microsoft.com/en-us/library/system.object.aspx">Object</a>.)</td></tr><tr data="public;inherited;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.object.gettype.aspx">GetType</a></td><td><span>Gets the <span><a href="http://msdn.microsoft.com/en-us/library/system.type.aspx">Type</a></span> of the current instance.</span> (Inherited from <a href="http://msdn.microsoft.com/en-us/library/system.object.aspx">Object</a>.)</td></tr><tr data="protected;inherited;portable_library;Windows_store_apps;"><td><img id="protmethod" alt="Protected method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Protected method" xmlns="" class="cl_IC155188"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.object.memberwiseclone.aspx">MemberwiseClone</a></td><td><span>Creates a shallow copy of the current <span><a href="http://msdn.microsoft.com/en-us/library/system.object.aspx">Object</a></span>.</span> (Inherited from <a href="http://msdn.microsoft.com/en-us/library/system.object.aspx">Object</a>.)</td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh195051.aspx">Run(Action)</a></td><td><span>Queues the specified work to run on the ThreadPool and returns a task handle for that work.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh160382.aspx">Run(Func<span xmlns="">&lt;</span>Task<span xmlns="">&gt;</span>)</a></td><td><span>Queues the specified work to run on the ThreadPool and returns a proxy for the  task returned by <span class="parameter">function</span>.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh160373.aspx">Run(Action, CancellationToken)</a></td><td><span>Queues the specified work to run on the ThreadPool and returns a task handle for that work.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194916.aspx">Run(Func<span xmlns="">&lt;</span>Task<span xmlns="">&gt;</span>, CancellationToken)</a></td><td><span>Queues the specified work to run on the ThreadPool and returns a proxy for the  task returned by <span class="parameter">function</span>.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194918.aspx">Run<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span><span xmlns="">&gt;</span>)</a></td><td><span>Queues the specified work to run on the ThreadPool and returns a proxy for the  <span><span class="input">Task(TResult)</span></span> returned by <span class="parameter">function</span>.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194921.aspx">Run<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>)</a></td><td><span>Queues the specified work to run on the ThreadPool and returns a <span><span class="input">Task(TResult)</span></span> handle for that work.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194871.aspx">Run<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>Task<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span><span xmlns="">&gt;</span>, CancellationToken)</a></td><td><span>Queues the specified work to run on the ThreadPool and returns a proxy for the  <span><span class="input">Task(TResult)</span></span> returned by <span class="parameter">function</span>.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh160376.aspx">Run<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(Func<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>, CancellationToken)</a></td><td><span>Queues the specified work to run on the ThreadPool and returns a <span><span class="input">Task(TResult)</span></span> handle for that work.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321435.aspx">RunSynchronously<span xmlns="">()</span></a></td><td><span>Runs the <span><span class="selflink">Task</span></span> synchronously on the current <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskscheduler.aspx">TaskScheduler</a></span>.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd449175.aspx">RunSynchronously(TaskScheduler)</a></td><td><span>Runs the <span><span class="selflink">Task</span></span> synchronously on the <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskscheduler.aspx">TaskScheduler</a></span> provided.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd270682.aspx">Start<span xmlns="">()</span></a></td><td><span>Starts the <span><span class="selflink">Task</span></span>, scheduling it for execution to the current <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskscheduler.aspx">TaskScheduler</a></span>.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321282.aspx">Start(TaskScheduler)</a></td><td><span>Starts the <span><span class="selflink">Task</span></span>, scheduling it for execution to the specified <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskscheduler.aspx">TaskScheduler</a></span>.</span></td></tr><tr data="public;inherited;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.object.tostring.aspx">ToString</a></td><td><span>Returns a string that represents the current object.</span> (Inherited from <a href="http://msdn.microsoft.com/en-us/library/system.object.aspx">Object</a>.)</td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd235635.aspx">Wait<span xmlns="">()</span></a></td><td><span>Waits for the <span><span class="selflink">Task</span></span> to complete execution.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321315.aspx">Wait(CancellationToken)</a></td><td><span>Waits for the cancellable <span><span class="selflink">Task</span></span> to complete execution.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd270644.aspx">Wait(Int32)</a></td><td><span>Waits for the <span><span class="selflink">Task</span></span> to complete execution within a specified number of milliseconds.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd235606.aspx">Wait(TimeSpan)</a></td><td><span>Waits for the <span><span class="selflink">Task</span></span> to complete execution within a specified time interval.</span></td></tr><tr data="public;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321457.aspx">Wait(Int32, CancellationToken)</a></td><td><span>Waits for the cancellable <span><span class="selflink">Task</span></span> to complete execution.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd270695.aspx">WaitAll(<span xmlns=""></span>Task<span xmlns="">[]</span>)</a></td><td><span>Waits for all of the provided <span><span class="selflink">Task</span></span> objects to complete execution.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd235699.aspx">WaitAll(<span xmlns=""></span>Task<span xmlns="">[]</span>, Int32)</a></td><td><span>Waits for all of the provided <span><span class="selflink">Task</span></span> objects to complete execution within a specified number of milliseconds.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321280.aspx">WaitAll(<span xmlns=""></span>Task<span xmlns="">[]</span>, CancellationToken)</a></td><td><span>Waits for all of the provided cancellable <span><span class="selflink">Task</span></span> objects to complete execution.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd235688.aspx">WaitAll(<span xmlns=""></span>Task<span xmlns="">[]</span>, TimeSpan)</a></td><td><span>Waits for all of the provided cancellable <span><span class="selflink">Task</span></span> objects to complete execution within a specified time interval.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321573.aspx">WaitAll(<span xmlns=""></span>Task<span xmlns="">[]</span>, Int32, CancellationToken)</a></td><td><span>Waits for all of the provided cancellable <span><span class="selflink">Task</span></span> objects to complete execution within a specified number of milliseconds.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd270672.aspx">WaitAny(<span xmlns=""></span>Task<span xmlns="">[]</span>)</a></td><td><span>Waits for any of the provided <span><span class="selflink">Task</span></span> objects to complete execution.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd235650.aspx">WaitAny(<span xmlns=""></span>Task<span xmlns="">[]</span>, Int32)</a></td><td><span>Waits for any of the provided <span><span class="selflink">Task</span></span> objects to complete execution within a specified number of milliseconds.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321317.aspx">WaitAny(<span xmlns=""></span>Task<span xmlns="">[]</span>, CancellationToken)</a></td><td><span>Waits for any of the provided cancellable <span><span class="selflink">Task</span></span> objects to complete execution.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd235645.aspx">WaitAny(<span xmlns=""></span>Task<span xmlns="">[]</span>, TimeSpan)</a></td><td><span>Waits for any of the provided <span><span class="selflink">Task</span></span> objects to complete execution within a specified time interval.</span></td></tr><tr data="public;static;declared;portable_library;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd321433.aspx">WaitAny(<span xmlns=""></span>Task<span xmlns="">[]</span>, Int32, CancellationToken)</a></td><td><span>Waits for any of the provided cancellable <span><span class="selflink">Task</span></span> objects to complete execution within a specified number of milliseconds.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh160384.aspx">WhenAll(IEnumerable<span xmlns="">&lt;</span>Task<span xmlns="">&gt;</span>)</a></td><td><span>Creates a task that will complete when all of the supplied tasks have completed.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh160374.aspx">WhenAll(<span xmlns=""></span>Task<span xmlns="">[]</span>)</a></td><td><span>Creates a task that will complete when all of the supplied tasks have completed.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194766.aspx">WhenAll<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(IEnumerable<span xmlns="">&lt;</span>Task<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span><span xmlns="">&gt;</span>)</a></td><td><span>Creates a task that will complete when all of the supplied tasks have completed.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194874.aspx">WhenAll<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(<span xmlns=""></span>Task<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span><span xmlns="">[]</span>)</a></td><td><span>Creates a task that will complete when all of the supplied tasks have completed.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194914.aspx">WhenAny(IEnumerable<span xmlns="">&lt;</span>Task<span xmlns="">&gt;</span>)</a></td><td><span>Creates a task that will complete when any of the supplied tasks have completed.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194796.aspx">WhenAny(<span xmlns=""></span>Task<span xmlns="">[]</span>)</a></td><td><span>Creates a task that will complete when any of the supplied tasks have completed.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh160383.aspx">WhenAny<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(IEnumerable<span xmlns="">&lt;</span>Task<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span><span xmlns="">&gt;</span>)</a></td><td><span>Creates a task that will complete when any of the supplied tasks have completed.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/hh194858.aspx">WhenAny<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span>(<span xmlns=""></span>Task<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span><span xmlns="">[]</span>)</a></td><td><span>Creates a task that will complete when any of the supplied tasks have completed.</span></td></tr><tr data="public;static;declared;Windows_store_apps;"><td><img id="pubmethod" alt="Public method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public method" xmlns="" class="cl_IC91302"><img id="static" alt="Static member" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Static member" xmlns="" class="cl_IC130242"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.yield.aspx">Yield</a></td><td><span>Creates an awaitable task that asynchronously yields back to the current context when awaited.</span></td></tr></tbody></table><a href="#mainBody">Top</a></div></div><div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">Extension&nbsp;Methods</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="extensionMethodTableToggle"></a><table id="memberList3" class="members"><tbody><tr><th class="iconColumn">
              &nbsp;
            </th><th class="nameColumn">Name</th><th class="descriptionColumn">Description</th></tr><tr data="public;inherited;Windows_store_apps;"><td><img id="pubextension" alt="Public Extension Method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public Extension Method" xmlns="" class="cl_IC79755"><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/system.windowsruntimesystemextensions.asasyncaction.aspx">AsAsyncAction</a></td><td><span>Returns a Windows Runtime asynchronous action that represents a started task. </span> (Defined by <a href="http://msdn.microsoft.com/en-us/library/system.windowsruntimesystemextensions.aspx">WindowsRuntimeSystemExtensions</a>.)</td></tr><tr data="public;inherited;"><td><img id="pubextension" alt="Public Extension Method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public Extension Method" xmlns="" class="cl_IC79755"></td><td><a href="http://msdn.microsoft.com/en-us/library/hh199417.aspx">DispatcherOperationWait<span xmlns="">()</span></a></td><td>Overloaded.  <span>Waits indefinitely for the underlying <span><a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcheroperation.aspx">DispatcherOperation</a></span> to complete.</span> (Defined by <a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.taskextensions.aspx">TaskExtensions</a>.)</td></tr><tr data="public;inherited;"><td><img id="pubextension" alt="Public Extension Method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public Extension Method" xmlns="" class="cl_IC79755"></td><td><a href="http://msdn.microsoft.com/en-us/library/hh199383.aspx">DispatcherOperationWait(TimeSpan)</a></td><td>Overloaded.  <span>Waits for the specified amount of time for the underlying <span><a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcheroperation.aspx">DispatcherOperation</a></span> to complete.</span> (Defined by <a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.taskextensions.aspx">TaskExtensions</a>.)</td></tr><tr data="public;inherited;"><td><img id="pubextension" alt="Public Extension Method" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Public Extension Method" xmlns="" class="cl_IC79755"></td><td><a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.taskextensions.isdispatcheroperationtask.aspx">IsDispatcherOperationTask</a></td><td><span>Returns a value that indicates whether this <span><span class="selflink">Task</span></span> is associated with a <span><a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcheroperation.aspx">DispatcherOperation</a></span>.</span> (Defined by <a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.taskextensions.aspx">TaskExtensions</a>.)</td></tr></tbody></table><a href="#mainBody">Top</a></div></div><div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">Explicit&nbsp;Interface&nbsp;Implementations</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="ExplicitInterfaceImplementationTableToggle"></a><table id="memberList4" class="members"><tbody><tr><th class="iconColumn">
              &nbsp;
            </th><th class="nameColumn">Name</th><th class="descriptionColumn">Description</th></tr><tr data="explicit;declared;portable_library;Windows_store_apps;"><td><img id="pubinterface" alt="Explicit interface implemetation" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Explicit interface implemetation" xmlns="" class="cl_IC141795"><img id="privproperty" alt="Private property" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC138214.gif" title="Private property" xmlns=""><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd235637.aspx">IAsyncResult<span xmlns="">.</span>AsyncWaitHandle</a></td><td><span>Gets a <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.waithandle.aspx">WaitHandle</a></span> that can be used to wait for the task to complete.</span></td></tr><tr data="explicit;declared;portable_library;Windows_store_apps;"><td><img id="pubinterface" alt="Explicit interface implemetation" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Explicit interface implemetation" xmlns="" class="cl_IC141795"><img id="privproperty" alt="Private property" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC138214.gif" title="Private property" xmlns=""><img id="PortableClassLibrary" alt="Supported by Portable Class Library" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC477625.png" title="Supported by Portable Class Library" xmlns=""><img id="storebag" alt="Supported in .NET for Windows Store apps" src="MicrosoftTaskClass_System.Threading.Tasks_files/IC628630.png" title="Supported in .NET for Windows Store apps" xmlns=""></td><td><a href="http://msdn.microsoft.com/en-us/library/dd270640.aspx">IAsyncResult<span xmlns="">.</span>CompletedSynchronously</a></td><td><span>Gets an indication of whether the operation completed synchronously.</span></td></tr></tbody></table><a href="#mainBody">Top</a></div></div><div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">Remarks</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="remarksToggle"></a><p><span><span class="selflink">Task</span></span> instances may be created in a variety of ways. The most common approach is by using the task’s <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.factory.aspx">Factory</a></span> property to retrieve a <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskfactory.aspx">TaskFactory</a></span> instance that can be used to create tasks for several purposes. For example, to create a <span><span class="selflink">Task</span></span> that runs an action, the factory's <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskfactory.startnew.aspx">StartNew</a></span> method may be used: </p>
<div id="code-snippet-2" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_5cf10dae-6684-4d00-a47c-7dfe4e5b5ee4');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_5cf10dae-6684-4d00-a47c-7dfe4e5b5ee4" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre>// C#
var t = Task.Factory.StartNew(() =&gt; DoAction());

' Visual Basic
 Dim t = Task.Factory.StartNew(Function() DoAction())
</pre></div>
            
        </div>
    </div>
</div>
<p>For more complete examples, see <span><a href="http://msdn.microsoft.com/en-us/library/dd537609.aspx">Task Parallelism (Task Parallel Library)</a></span>.</p><p>The <span><span class="selflink">Task</span></span>
 class also provides constructors that initialize the task but that do 
not schedule it for execution. For performance reasons, the task 
factory’s <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskfactory.startnew.aspx">StartNew</a></span>
 method should be the preferred mechanism for creating and scheduling 
computational tasks, but for scenarios where creation and scheduling 
must be separated, the constructors may be used, and the task's <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.start.aspx">Start</a></span> method may then be used to schedule the task for execution at a later time. </p><p>For operations that return values, the <span><a href="http://msdn.microsoft.com/en-us/library/dd321424.aspx">Task<span xmlns="">&lt;</span>TResult<span xmlns="">&gt;</span></a></span> class should be used. </p><h3 class="subHeading">For Debugger Developers</h3><div class="subsection"><p>For
 developers implementing custom debuggers, several internal and private 
members of task may be useful (these may change from release to 
release). The <span><span class="input">m_taskId</span></span> field serves as the backing store for the <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.id.aspx">Id</a></span>
 property, however accessing this field directly from a debugger may be 
more efficient than accessing the same value through the property's 
getter method (the <span><span class="input">s_taskIdCounter</span></span> counter is used to retrieve the next available ID for a task). Similarly, the <span><span class="input">m_stateFlags</span></span> field stores information about the current lifecycle stage of the task, information also accessible through the <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.status.aspx">Status</a></span> property. The <span><span class="input">m_action</span></span> field stores a reference to the task's delegate, and the <span><span class="input">m_stateObject</span></span> field stores the async state passed to the task by the developer. Finally, for debuggers that parse stack frames, the <span><span class="input">InternalWait</span></span> method serves a potential marker for when a task is entering a wait operation. </p></div><div class="alert"><table><tbody><tr><th align="left"><img id="alert_note" alt="Note" src="MicrosoftTaskClass_System.Threading.Tasks_files/clear.gif" title="Note" xmlns="" class="cl_IC101471"><strong>Note</strong></th></tr><tr><td><p>The <a href="http://msdn.microsoft.com/en-us/library/system.security.permissions.hostprotectionattribute.aspx">HostProtectionAttribute</a> attribute applied to this type or member has the following <a href="http://msdn.microsoft.com/en-us/library/system.security.permissions.hostprotectionattribute.resources.aspx">Resources</a> property value: <span class="label">Synchronization | ExternalThreading</span>. The <a href="http://msdn.microsoft.com/en-us/library/system.security.permissions.hostprotectionattribute.aspx">HostProtectionAttribute</a>
 does not affect desktop applications (which are typically started by 
double-clicking an icon, typing a command, or entering a URL in a 
browser). For more information, see the <a href="http://msdn.microsoft.com/en-us/library/system.security.permissions.hostprotectionattribute.aspx">HostProtectionAttribute</a> class or <a href="http://msdn.microsoft.com/en-us/library/ms172338.aspx">SQL Server Programming and Host Protection Attributes</a>.</p></td></tr></tbody></table></div></div></div><div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">Examples</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="exampleToggle"></a><p>The following example shows how to start a task by using the <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskfactory.startnew.aspx">TaskFactory<span xmlns="">.</span>StartNew</a></span> method:</p><div>
<div id="code-snippet-3" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabActive" dir="ltr"><a>C#</a></div><div class="codeSnippetContainerTab" dir="ltr"><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx?cs-save-lang=1&amp;cs-lang=vb#code-snippet-3">VB</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_8c301292-2b83-4d8e-85fa-93866bf77ac4');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_8c301292-2b83-4d8e-85fa-93866bf77ac4" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">using</span> System;
<span style="color:Blue;">using</span> System.Threading;
<span style="color:Blue;">using</span> System.Threading.Tasks;

<span style="color:Blue;">class</span> StartNewDemo
{
    <span style="color:Green;">// Demonstrated features:&nbsp;</span>
    <span style="color:Green;">//		Task ctor()&nbsp;</span>
    <span style="color:Green;">// 		Task.Factory&nbsp;</span>
    <span style="color:Green;">//		Task.Wait()&nbsp;</span>
    <span style="color:Green;">//		Task.RunSynchronously()&nbsp;</span>
    <span style="color:Green;">// Expected results:&nbsp;</span>
    <span style="color:Green;">// 		Task t1 (alpha) is created unstarted.&nbsp;</span>
    <span style="color:Green;">//		Task t2 (beta) is created started.&nbsp;</span>
    <span style="color:Green;">//		Task t1's (alpha) start is held until after t2 (beta) is started.&nbsp;</span>
    <span style="color:Green;">//		Both tasks t1 (alpha) and t2 (beta) are potentially executed on threads other than the main thread on multi-core machines.&nbsp;</span>
    <span style="color:Green;">//		Task t3 (gamma) is executed synchronously on the main thread.&nbsp;</span>
    <span style="color:Green;">// Documentation:&nbsp;</span>
    <span style="color:Green;">//		http://msdn.microsoft.com/en-us/library/system.threading.tasks.task_members(VS.100).aspx&nbsp;</span>
    <span style="color:Blue;">static</span>&nbsp;<span style="color:Blue;">void</span> Main()
    {
        Action&lt;<span style="color:Blue;">object</span>&gt; action = (<span style="color:Blue;">object</span> obj) =&gt;
        {
            Console.WriteLine(<span style="color:#A31515;">"Task={0}, obj={1}, Thread={2}"</span>, Task.CurrentId, obj.ToString(), Thread.CurrentThread.ManagedThreadId);
        };

        <span style="color:Green;">// Construct an unstarted task</span>
        Task t1 = <span style="color:Blue;">new</span> Task(action, <span style="color:#A31515;">"alpha"</span>);

        <span style="color:Green;">// Cosntruct a started task</span>
        Task t2 = Task.Factory.StartNew(action, <span style="color:#A31515;">"beta"</span>);

        <span style="color:Green;">// Block the main thread to demonstate that t2 is executing</span>
        t2.Wait();

        <span style="color:Green;">// Launch t1 </span>
        t1.Start();

        Console.WriteLine(<span style="color:#A31515;">"t1 has been launched. (Main Thread={0})"</span>, Thread.CurrentThread.ManagedThreadId);

        <span style="color:Green;">// Wait for the task to finish.&nbsp;</span>
        <span style="color:Green;">// You may optionally provide a timeout interval or a cancellation token&nbsp;</span>
        <span style="color:Green;">// to mitigate situations when the task takes too long to finish.</span>
        t1.Wait();

        <span style="color:Green;">// Construct an unstarted task</span>
        Task t3 = <span style="color:Blue;">new</span> Task(action, <span style="color:#A31515;">"gamma"</span>);

        <span style="color:Green;">// Run it synchronously</span>
        t3.RunSynchronously();

        <span style="color:Green;">// Although the task was run synchrounously, it is a good practice to wait for it which observes for &nbsp;</span>
        <span style="color:Green;">// exceptions potentially thrown by that task.</span>
        t3.Wait();
    }


}
</pre></div>
            
        </div>
    </div>
</div>
</div></div></div><div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">Version Information</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="versionsTitleToggle"></a><h4 class="subHeading">.NET Framework</h4>Supported in: 4.5, 4<br><h4 class="subHeading">.NET Framework Client Profile</h4>Supported in: 4<br><h4 class="subHeading">Portable Class Library</h4>Supported in: Portable Class Library<br><h4 class="subHeading">.NET for Windows Store apps</h4>Supported in: Windows 8<br></div></div><div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">Platforms</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="platformsTitleToggle"></a><p>Windows
 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 
2008 (Server Core Role not supported), Windows Server 2008 R2 (Server 
Core Role supported with SP1 or later; Itanium not supported)</p><p>  <span>
		  The .NET Framework does not support all versions of every platform. For a list of the supported versions, see <a href="http://msdn.microsoft.com/en-us/library/8z6watww.aspx">.NET Framework System Requirements</a>.
	  </span> </p></div></div><div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">Thread Safety</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="threadSafetyToggle"></a><p>All members of <span><span class="selflink">Task</span></span>, except for <span><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.dispose.aspx">Dispose</a></span>, are thread-safe and may be used from multiple threads concurrently.</p></div></div><div><div class="LW_CollapsibleArea_TitleDiv"><div><a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Collapse"><span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span><span class="LW_CollapsibleArea_Title">See Also</span></a><div class="LW_CollapsibleArea_HrDiv"><hr class="LW_CollapsibleArea_Hr"></div></div></div><div class="sectionblock"><a id="seeAlsoToggle"></a><h4 class="subHeading">Reference</h4><div class="seeAlsoStyle"><a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.aspx">System.Threading.Tasks Namespace</a></div><h4 class="subHeading">Other Resources</h4><div class="seeAlsoStyle"><span><a href="http://msdn.microsoft.com/en-us/library/dd460717.aspx">Task Parallel Library (TPL)</a></span></div><div class="seeAlsoStyle"><span><a href="http://msdn.microsoft.com/en-us/library/dd537609.aspx">Task Parallelism (Task Parallel Library)</a></span></div></div></div></div>
    </div>
  </div>
</div>





<div id="contentFeedback">
    <form method="post" action="/en-us/library/feedback/add/system.threading.tasks.task.aspx">
        <input name="__RequestVerificationToken" value="iGmUonFOlinAHjEwJ-T_BzSm3l1jAKhH-Ms8I8913ecy6_tD8wizN2lIeoJmy0ORoHB0ZAEV6y8A5KAhotJzCZb1FdX97kWdlYHI0FwwudmIdctAOoLEXCbSs3zVk4hBaNLDPw2" type="hidden">
    <div id="contentFeedbackContainer">
        <div class="FeedbackTitleContainer">
            <a name="feedback"></a>
        Did you find this helpful?
            <input id="rdIsUsefulYes" name="rdIsUseful" value="1" onclick="toggleContentFeedback('Yes');" type="radio"><label for="rdIsUsefulYes">Yes</label>
            <input id="rdIsUsefulNo" name="rdIsUseful" value="0" onclick="toggleContentFeedback('No');" type="radio"><label for="rdIsUsefulNo">No</label>
        
        </div>
        
            <div id="contentFeedbackQAContainer">
                
                    <div id="feedbackListNoContainer" class="FeedbackListContainer">
                        
                            <div>
                                <input id="chkbxNo201" name="chkbxNo" value="201" type="checkbox">
                                <label for="chkbxNo201">Not accurate</label>
                            </div>
                        
                            <div>
                                <input id="chkbxNo202" name="chkbxNo" value="202" type="checkbox">
                                <label for="chkbxNo202">Not enough depth</label>
                            </div>
                        
                            <div>
                                <input id="chkbxNo203" name="chkbxNo" value="203" type="checkbox">
                                <label for="chkbxNo203">Need more code examples</label>
                            </div>
                        
                    </div>
                
                <div class="FeedbackTellUsMoreContainer">
                    <textarea id="feedbackText" name="feedbackText" class="TellUsMoreTextBoxSearchLoaded" onfocus="WatermarkFocus(this, 'Tell us more...', 'TellUsMoreTextBoxSearch')" onblur="WatermarkBlur(this, 'Tell us more...', 'TellUsMoreTextBoxSearchLoaded')" onmouseover="TextBoxCharactersCounter(this, document.getElementById('feedbackTextCounter'), 1500)" onkeydown="TextBoxCharactersCounter(this, document.getElementById('feedbackTextCounter'), 1500)" onkeyup="TextBoxCharactersCounter(this, document.getElementById('feedbackTextCounter'), 1500)">Tell us more...</textarea>
                </div>
                <span class="counter">(<span id="feedbackTextCounter">1500</span> characters remaining)</span>
                <input id="returnUrl" name="returnUrl" value="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx" type="hidden">
                <input id="submit" value="Submit" title="Click to Submit Feedback" onclick="WatermarkOnSubmit(document.getElementById('feedbackText'), 'Tell us more...', 'TellUsMoreTextBoxSearch')" type="submit">
                <div style="clear: both;"></div>
            </div>  
        
    </div>
    </form>
</div>
    



</div>


            </div>
            <div class="clear"></div>
        
            
    
   <div id="ux-footer" class="IE IE7 ltr">
    <div id="ux-footer-cols">
        

        <div class="TocNavigation">
            <div class="linksContainer">
                    <ul class="links" style="width: 19.99%;">
                        <li class="linksTitle"><a href="http://msdn.microsoft.com/vstudio/default.aspx" title="Tools">Tools</a></li>
                                <li><a href="http://msdn.microsoft.com/vstudio/default.aspx" title="Visual Studio">Visual Studio</a></li>
                                <li><a href="http://expression.microsoft.com/default.aspx" title="Expression">Expression</a></li>
                                <li><a href="http://www.asp.net/" title="ASP.NET">ASP.NET</a></li>
                                <li><a href="http://msdn.microsoft.com/silverlight/" title="Silverlight">Silverlight</a></li>
                    </ul>
                    <ul class="links" style="width: 19.99%;">
                        <li class="linksTitle"><a href="http://msdn.microsoft.com/vstudio/default.aspx" title="Platforms">Platforms</a></li>
                                <li><a href="http://msdn.microsoft.com/vstudio/default.aspx" title="Visual Studio">Visual Studio</a></li>
                                <li><a href="http://msdn.microsoft.com/windows/apps/default.aspx" title="Windows">Windows</a></li>
                                <li><a href="https://dev.windowsphone.com/" title="Windows Phone">Windows Phone</a></li>
                                <li><a href="http://www.windowsazure.com/en-us/develop/overview/" title="Windows Azure">Windows Azure</a></li>
                                <li><a href="http://msdn.microsoft.com/office/default.aspx" title="Office">Office</a></li>
                    </ul>
                    <ul class="links" style="width: 19.99%;">
                        <li class="linksTitle"><a href="http://msdn.microsoft.com/windowsserver/default.aspx" title="Servers">Servers</a></li>
                                <li><a href="http://msdn.microsoft.com/windowsserver/default.aspx" title="Windows Server">Windows Server</a></li>
                                <li><a href="http://msdn.microsoft.com/exchange/default.aspx" title="Exchange Server">Exchange Server</a></li>
                                <li><a href="http://msdn.microsoft.com/sqlserver/default.aspx" title="SQL Server">SQL Server</a></li>
                                <li><a href="http://msdn.microsoft.com/biztalk/default.aspx" title="Biz Talk Server">Biz Talk Server</a></li>
                                <li><a href="http://msdn.microsoft.com/data/default.aspx" title="Data">Data</a></li>
                    </ul>
                    <ul class="links" style="width: 19.99%;">
                        <li class="linksTitle"><a href="http://msdn.microsoft.com/subscriptions/default.aspx" title="Developer resources">Developer resources</a></li>
                                <li><a href="http://msdn.microsoft.com/subscriptions/default.aspx" title="MSDN Subscriptions">MSDN Subscriptions</a></li>
                                <li><a href="http://msdn.microsoft.com/magazine/default.aspx" title="MSDN Magazine">MSDN Magazine</a></li>
                                <li><a href="http://msdn.microsoft.com/aa570311" title="MSDN Flash Newsletter">MSDN Flash Newsletter</a></li>
                                <li><a href="http://code.msdn.microsoft.com/" title="Code Samples">Code Samples</a></li>
                                <li><a href="http://social.msdn.microsoft.com/forums/en-us/categories" title="MSDN Forums">MSDN Forums</a></li>
                    </ul>
                    <ul class="links" style="width: 19.99%;">
                        <li class="linksTitle"><a href="http://msdn.microsoft.com/evalcenter/default.aspx" title="Get started for free">Get started for free</a></li>
                                <li><a href="http://msdn.microsoft.com/evalcenter/default.aspx" title="MSDN evaluation center">MSDN evaluation center</a></li>
                                <li><a href="http://www.microsoft.com/bizspark/" title="BizSpark (for startups)">BizSpark (for startups)</a></li>
                                <li><a href="https://www.dreamspark.com/" title="DreamSpark (for students)">DreamSpark (for students)</a></li>
                                <li><a href="https://www.microsoft.com/faculty" title="School faculty">School faculty</a></li>
                    </ul>
            </div>
        </div>        

    </div>

    <div class="ux-footer-clear"></div>
    <div id="footerRight">
        <div id="FooterLogoContainer"><div id="FooterLogo"></div></div>
        <div id="FooterCopyright">© 2013 Microsoft. All rights reserved.</div> 
    </div>
    <div id="footerLeft">
        <div id="footerGroup">
            <div id="LinkGroup">
                <div id="Links1"><div data-fragmentname="FooterLinks" id="Fragment_FooterLinks" xmlns="http://www.w3.org/1999/xhtml">
  
  <div class="LinkList">
    <div class="Links">
      <ul class="LinkColumn horizontal">
        <li>
          <a href="http://msdn.microsoft.com/en-us/newsletter.aspx" xmlns="http://www.w3.org/1999/xhtml">Newsletter</a>
        </li>
        <li>
          <div class="LinksDivider">|</div>
          <a href="http://msdn.microsoft.com/en-us/subscriptions/aa948875.aspx" xmlns="http://www.w3.org/1999/xhtml">Contact Us</a>
        </li>
        <li>
          <div class="LinksDivider">|</div>
          <a href="http://privacy.microsoft.com/en-us/default.mspx" xmlns="http://www.w3.org/1999/xhtml">Privacy Statement</a>
        </li>
        <li>
          <div class="LinksDivider">|</div>
          <a href="http://msdn.microsoft.com/en-US/cc300389.aspx" xmlns="http://www.w3.org/1999/xhtml">Terms of Use</a>
        </li>
        <li>
          <div class="LinksDivider">|</div>
          <a href="http://www.microsoft.com/About/Legal/EN/US/IntellectualProperty/Trademarks/EN-US.aspx" xmlns="http://www.w3.org/1999/xhtml">Trademarks</a>
        </li>
      </ul>
    </div>
  </div>
</div></div>
            </div>
            <div id="Feedback">
                <div class="feedbackListItem">
                    <div class="LinksDivider">|</div>
                    <div class="LinkColumn">
                        





<div class="FooterSiteFeedBack">
    <a id="SiteFeedbackLinkOpener" href="javascript:void(0)">
        <span class="FeedbackButton clip20x21" id="FeedbackButton">
            <img id="feedBackImg" class="cl_footer_feedback_icon" src="MicrosoftTaskClass_System.Threading.Tasks_files/ImageSprite.png" alt="Site Feedback">
        </span>
        Site Feedback
    </a>
    
    <div id="SiteFeedbackLinkContainer" class="SiteFeedbackLinkContainer" style="display: none;">
    <form id="siteFeedbackForm" method="post" action="http://msdn.microsoft.com/en-us/library/feedback/add/system.threading.tasks.task(v=msdn.10).aspx">
        <div class="SiteFeedbackLinkTitleContainer">
            <div class="SiteFeedbackLinkTitle">
                Site Feedback
            </div>
            <div class="SiteFeedbackLinkCancel">
                <a id="SiteFeedbackLinkCloser" href="javascript:void(0)">x</a>
            </div>
        </div>
        <div class="SiteFeedbackLinkData">
            <div class="SiteFeedbackLinkInfoText">
                Tell us about your experience...
            </div>
            <div class="QuestionText">
                Did the page load quickly?
            </div>
            <div class="AnswerText">
                
                <span>
                    Yes<span>
                        <input id="searchBox" name="searchBox" value="1" type="radio"></span></span>
                
                <span>
                    No<span>
                        <input id="searchBox" name="searchBox" value="0" type="radio"></span></span>
                
            </div>
            <div class="QuestionText">
                Do you like the page design?
            </div>
            <div class="AnswerText">
                
                <span>
                    Yes<span>
                        <input id="tabbedCode" name="tabbedCode" value="1" type="radio"></span></span>
                
                <span>
                    No<span>
                        <input id="tabbedCode" name="tabbedCode" value="0" type="radio"></span></span>
                
            </div>
            <div class="QuestionText">
                Tell us more
            </div>
            <div class="SiteFeedbackLinkTextAreaContainer">
                <textarea id="feedbackText" data-maxlength="4000" name="feedbackText" cols="25" rows="5" class="SiteFeedbackLinkTextArea"></textarea>
                
                <textarea id="feedbackDescription" name="feedbackDescription" cols="25" rows="10" style="display: none;">Enter description here.</textarea>
                <input id="feedbackPriority" name="feedbackPriority" value="" type="hidden">
                <input id="feedbackSourceUrl" name="feedbackSourceUrl" value="" type="hidden">
                <input id="ClientIP" name="ClientIP" value="" type="hidden">
                <input id="ClientOS" name="ClientOS" value="" type="hidden">
                <input id="ClientBrowser" name="ClientBrowser" value="" type="hidden">
                <input id="ClientTime" name="ClientTime" value="" type="hidden">
                <input id="ClientTimeZone" name="ClientTimeZone" value="" type="hidden">
                
            </div>
            <div>
                <input id="siteFeedbackSubmit" value="Send" class="SiteFeedbackLinkSubmit" type="submit">
            </div>
        </div>
        <input id="returnUrl" name="returnUrl" value="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx" type="hidden">
    <input name="__RequestVerificationToken" value="XJLshn5T29Cypu5UDN6SsF65DLUzK0w-WLK4dY92FEh3wmP4qwGx9W-RixSUmTzGRImRN6iY1bR1_zyD87MWzRcrepv40PYyUvS1arCF_tubg7PpFxwUMD7BYhwj3oky_O3GqQ2" type="hidden"></form>
</div>
    
    
</div>

                    </div>
                </div>
            </div>
        </div>
        <div style="clear:both"></div>
        <div id="Links2"></div>
    </div>
</div> 


            <div class="footerPrintView">
                <div class="footerCopyrightPrintView">© 2013 Microsoft. All rights reserved.</div>
            </div>

            
            
    
    
    <input id="tocPaddingPerLevel" value="17" type="hidden">


        
            <input id="MtpsDevice" value="Default" type="hidden">


<!--[CDATA[ Third party scripts and code linked to or referenced from this website are licensed to you by the parties that own such code, not by Microsoft.  See ASP.NET Ajax CDN Terms of Use – http://www.asp.net/ajaxlibrary/CDN.ashx. ]]-->
        
            
            
            
            
            
        





<noscript><div><img alt="DCSIMG" id="Img1" width="1" height="1" src="http://m.webtrends.com/dcsmgru7m99k7mqmgrhudo0k8_8c6m/njs.gif?dcsuri=/nojavascript&amp;WT.js=No" /></div></noscript>









<noscript>
  <a href="http://www.omniture.com" title="Web Analytics">
    <img src="//msstonojsmsdn.112.2o7.net/b/ss/msstonojsmsdn/1/H.20.2--NS/0" height="1" width="1" border="0" alt="" />
  </a>
</noscript>




<div id="globalRequestVerification">
    <input name="__RequestVerificationToken" value="XJLshn5T29Cypu5UDN6SsF65DLUzK0w-WLK4dY92FEh3wmP4qwGx9W-RixSUmTzGRImRN6iY1bR1_zyD87MWzRcrepv40PYyUvS1arCF_tubg7PpFxwUMD7BYhwj3oky_O3GqQ2" type="hidden">
</div>


        </div>
    <script type="text/javascript" class="mtps-injected">
/*<![CDATA[*/
(function(window,document){"use strict";function preload(scripts){for(var result=[],script,e,i=0;i<scripts.length;i++)script=scripts[i],script.hasOwnProperty("url")&&(e=document.createElement("script"),e.src=script.url,script.throwaway=e),result.push(script);return result}function inject(scripts,index){var script,elem;if(index>=scripts.length){delete mtps.injectScripts;return}script=scripts[index],elem=document.createElement("script"),elem.className="mtps-injected",elem.async=!1;var isLoaded=!1,timeoutId=0,injectNextFnName="",injectNext=elem.onerror=function(){isLoaded||(isLoaded=!0,inject(scripts,index+1),window.clearTimeout(timeoutId),elem.onload=elem.onerror=elem.onreadystatechange=null,injectNextFnName&&delete mtps[injectNextFnName],elem.removeEventListener&&elem.removeEventListener("load",injectNext,!1))};elem.addEventListener?elem.addEventListener("load",injectNext,!1):elem.readyState==="uninitialized"?elem.onreadystatechange=function(){(this.readyState==="loaded"||this.readyState==="complete")&&injectNext()}:elem.onload=injectNext,script.hasOwnProperty("url")?(timeoutId=window.setTimeout(injectNext,12e4),elem.src=script.url):(injectNextFnName="_injectNextScript_"+index,mtps[injectNextFnName]=injectNext,timeoutId=window.setTimeout(injectNext,2e3),elem.text="try {\n"+script.txt+"\n} finally { MTPS."+injectNextFnName+" && MTPS."+injectNextFnName+"(); }"),parent.appendChild(elem)}var mtps=window.MTPS||(window.MTPS={}),parent=document.getElementsByTagName("head")[0];mtps.injectScripts=function(scripts){inject(preload(scripts),0)}})(window,document);
MTPS.injectScripts([
	{ txt: "/**/\r\n(window.MTPS || (window.MTPS = {})).cdnDomains || (window.MTPS.cdnDomains = { \r\n\t\"image\": \"http://i.msdn.microsoft.com\", \r\n\t\"js\": \"http://i2.msdn.microsoft.com\", \r\n\t\"css\": \"http://i3.msdn.microsoft.com\"\r\n});\r\n/**/" },
	{ url: "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js" },
	{ txt: "//\n  var literalNormalizedUrl = \u0027/en-us/library/dd235678(d=default,l=en-us,v=vs.110).aspx\u0027;\n  var wt_nvr_ru = \u0027WT_NVR_RU\u0027;\n  var wt_fpcdom = \u0027.microsoft.com\u0027;\n  var wt_domlist = \u0027msdn.microsoft.com\u0027;\n  var wt_pathlist = \u0027\u0027;\n  var wt_paramlist = \u0027DCSext.mtps_devcenter\u0027;\n  var wt_siteid = \u0027MSDN\u0027;\n  var gDomain = \u0027m.webtrends.com\u0027;\n  var gDcsId = \u0027dcsmgru7m99k7mqmgrhudo0k8_8c6m\u0027;\n  var gFpc = \u0027WT_FPC\u0027;\n\n\n\n  if (document.cookie.indexOf(gFpc + \"=\") == -1) {\n    var wtidJs = document.createElement(\"script\");\n    wtidJs.src = \"//\" + gDomain + \"/\" + gDcsId + \"/wtid.js\";\n    document.getElementsByTagName(\"head\")[0].appendChild(wtidJs);\n  }\n\n\n\n  var detectedLocale = \u0027en-us\u0027;\n  var wtsp = \u0027msdnlib_dotnet\u0027;\n  var gTrackEvents = \u00270\u0027;\n/**/" },
	{ txt: "/**/\n  var omni_guid = \"2bf44dc7-9666-47f8-b76a-07d8854f6b2a\";\n/**/" },
	{ url: "http://i2.msdn.microsoft.com/Combined.js?resources=0:Utilities,0:Topic,1:webtrendsscript,2:omni_rsid_MSDN,3:SearchBox;/Areas/Epx/Content/Scripts:0,/Areas/Global/Content/Webtrends/resources:1,/Areas/Global/Content/Omniture/resources/MSDN:2,/Areas/Epx/Themes/Base/Content:3\u0026amp;hashKey=5982499A7F75BAC5491807268AEC2A90" },
	{ url: "http://i1.services.social.microsoft.com/search/Widgets/SearchBox.jss?boxid=HeaderSearchTextBox\u0026btnid=HeaderSearchButton\u0026brand=MSDN\u0026loc=en-us\u0026watermark=MSDN" },
	{ url: "http://i2.msdn.microsoft.com/Combined.js?resources=0:Toc,0:NavigationResize,1:FeedbackCounter;/Areas/Epx/Library/Content:0,/Areas/Epx/Shared/Content:1\u0026amp;hashKey=8BB72751CDDF2F68EE50F9C219164DA1" },
	{ txt: "MTPS = window.MTPS || {}; MTPS.LocalizedStrings = window.MTPS.LocalizedStrings || {}; MTPS.LocalizedStrings.ExpandButtonTooltip = \u0027Expand\u0027; MTPS.LocalizedStrings.CollapseButtonTooltip = \u0027Collapse\u0027;" },
	{ url: "http://i2.msdn.microsoft.com/Combined.js?resources=0:Feedback,1:SiteFeedbackLink,1:CodeSnippet,1:TopicNotInScope,1:CollapsibleArea,1:VersionSelector,1:SurveyBroker;/Areas/Epx/Shared/Content:0,/Areas/Epx/Content/Scripts:1\u0026amp;hashKey=3FE4B697FEB162FA3B90C8FCC3EF171F" },
	{ txt: "$(document).ready(function() {\n        try {\n            var token = $(\"#globalRequestVerification input[name=\u0027__RequestVerificationToken\u0027]\").clone();\n            $(\"#siteFeedbackForm\").append(token);\n        } catch(err) {\n            \n        }\n    });" }
]);

/*]]>*/
</script>
<script src="MicrosoftTaskClass_System.Threading.Tasks_files/broker-config.js"></script><div id="_WEDCSInsertedData" style="display: none;"><iframe id="_msnFrame" src="MicrosoftTaskClass_System.Threading.Tasks_files/c.gif" style="z-index:-1;height:1px;width:1px;display:none;visibility:hidden;" onload="javascript:MscomBeacon();"></iframe></div></body></html>